package com.translation.android.model;

import java.text.SimpleDateFormat;
import java.util.Date;

public class History {
	private String his_name;
	private String his_time;

	public History() {
	}

	public History(String hisName, String hisTime) {
		his_name = hisName;
		his_time = hisTime;
	}

	public History(String hisName) {
		his_name = hisName;
		his_time = new SimpleDateFormat("MM-dd").format(new Date());
	}

	public String getHis_name() {
		return his_name;
	}

	public void setHis_name(String hisName) {
		his_name = hisName;
	}

	public String getHis_time() {
		return his_time;
	}

	public void setHis_time(String hisTime) {
		his_time = hisTime;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj != null)
			if (obj instanceof History) {
				if (((History) obj).getHis_name().endsWith(this.getHis_name())) {
					return true;
				}
			}
		return false;
	}

}